#include "settingpro.h"

#include <QCoreApplication>
#include <qDebug>

void SettingPro::setBeginGroup(QString bg)
{

}

QString SettingPro::getEEGMac()
{
    return settings->value("eegMac").toString();
}

QString SettingPro::getEEGNo()
{
    return settings->value("eegNo").toString();
}

QString SettingPro::getECGMac()
{
    return settings->value("ecgMac").toString();
}

QString SettingPro::getECGNo()
{
    return settings->value("ecgNo").toString();
}

SettingPro::SettingPro(QString bg) {
    qDebug()<<"SettingPro created！";
    settings=new QSettings(QSettings::NativeFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
    settings->beginGroup(bg);
}

SettingPro::~SettingPro()
{
    settings->endGroup();
    delete settings;
    qDebug()<<"SettingPro destroyed";
}
